<!DOCTYPE html>
<html lang="zh-cmn-Hans" class="wide wow-animation smoothscroll scrollTo">
  <head>
    {template "layouts","header"}
    <script type="text/javascript" src="{JS_PATH}cookie.js"></script>
		<script type="text/javascript" src="{JS_PATH}search_common.js"></script>
  </head>
  <body>
    <!-- Page-->
    <div class="page text-center">
      <!-- Page Header-->
      <header class="page-head">
        {template "layouts","navbar"}
      </header>
			<!-- Modern Breadcrumbs-->
			<section class="breadcrumb-modern context-dark text-md-left">
			  <div class="shell section-34 section-md-top-110 section-md-bottom-41">
			    <h1>搜索</h1>
			    <ul class="list-inline list-inline-arrows p offset-top-34 offset-md-top-70">
			      <li><a href="{siteurl($siteid)}">首页</a></li>
			      <li><a href="#">搜索</a></li>
			    </ul>
			  </div>
			</section>

      <!-- Page Content-->
      <main class="page-content">
        <!-- Masonry Blog-->
        <!-- <div id="fb-root"></div> -->
        <section class="section-98 section-sm-110">
          <div class="shell">
            <div class="range text-left">
              <div class="cell-md-10 cell-lg-8">
                <h6>关键字<span class="text-bold text-primary">{$search_q}</span>的搜索结果</h6>
                <hr class="text-subline">

                <div class="range range-xs-center offset-top-0">

                  <div class="cell-sm-12">
                    <article class="post post-modern post-modern-classic post-modern-classic-full">
                      {if $search_data}
                        {loop $search_data $i $r}
                        <section class="post-content text-left">
                          <div class="post-title offset-top-8">
                            <h4 class="text-bold"><a href="{$r['url']}">{$r['title']}</a></h4>
                          </div>
                          <ul class="list-inline list-inline-dashed">
                            <li>{date('Y-m-d H:m:s',$r['inputtime'])}</li>
                            <li class="text-primary">{$r['username']}</li>
                          </ul>
                          <div class="post-body">
                            {$r[description]}
                          </div>
                        </section>
                        <hr class="text-classic">
                        {/loop}
                      {else}
                        <section class="post-content text-left">
                          未找到结果...
                        </section>
                      {/if}
                    </article>
                  </div>

                  <div class="offset-top-20">{$pages}</div>

                </div>

              </div>
              <div class="cell-sm-10 cell-md-8 cell-lg-4 offset-top-66 offset-md-top-90 offset-lg-top-0">
								<div class="blog-grid-sidebar inset-lg-left-30">
                  <!-- Aside-->
                  <aside class="text-left">
                    <!-- 搜索框-->
                    <div>
											{template "layouts","c_search"}
                    </div>
                    <!-- 时间过滤 -->
                    <div class="offset-top-30 offset-md-top-60">
											<h6>搜索历史</h6>
											<hr class="text-subline">
											<div class="offset-top-14 offset-md-top-20 rd-search-blog">
											  <!-- RD Search Form-->
												<div class="tags group group-sm">
													<a href="?m=search&c=index&a=init&typeid={$typeid}&q={urlencode($search_q)}&siteid={$siteid}&time=all" class="btn-tag btn btn-default">全部时间</a>
													<a href="?m=search&c=index&a=init&typeid={$typeid}&q={urlencode($search_q)}&siteid={$siteid}&time=day" class="btn-tag btn btn-default">一天内</a>
													<a href="?m=search&c=index&a=init&typeid={$typeid}&q={urlencode($search_q)}&siteid={$siteid}&time=week" class="btn-tag btn btn-default">一周内</a>
													<a href="?m=search&c=index&a=init&typeid={$typeid}&q={urlencode($search_q)}&siteid={$siteid}&time=month" class="btn-tag btn btn-default">一月内</a>
													<a href="?m=search&c=index&a=init&typeid={$typeid}&q={urlencode($search_q)}&siteid={$siteid}&time=year" class="btn-tag btn btn-default">一年内</a>
										    </div>
											</div>
                    </div>
										<!-- 搜索历史 -->
										<div class="offset-top-30 offset-md-top-60">
											<h6>搜索历史</h6>
											<hr class="text-subline">
											<div class="offset-top-14 offset-md-top-20 rd-search-blog">
												<ul id='history_ul' class="list list-marked list-marked-icon text-dark inset-left-0 list-marked-gray">
                        </ul>
											</div>
                    </div>
                  </aside>
                </div>

              </div>
            </div>
          </div>
        </section>
      </main>
      {template "layouts","footer"}
    </div>
    {template "layouts","global"}
    {template "layouts","javascript"}
		<script type="text/javascript" src="{JS_PATH}search_history.js"></script>
    {if $setting['suggestenable']}
    <script type="text/javascript" src="{JS_PATH}jquery.suggest.js"></script>
    <script type="text/javascript" src="{JS_PATH}search_suggest.js"></script>
    {/if}
  </body>
</html>
